package com.amigo.online.provider.compare.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.amigo.online.provider.compare.mapper.MusicComparisonMapper;
import com.amigo.online.provider.compare.service.MusicComparisonService;

@Service
public class MusicComparisonServiceImpl implements MusicComparisonService {

    @Autowired
    MusicComparisonMapper musicComparisonMapper;

    @Override
    public int getMaxId() {
        Integer result = musicComparisonMapper.getMaxId();
        if (result == null) {
            return 0;
        } else {
            return result;
        }

    }

    @Override
    public int getRandomMusicId() {
        musicComparisonMapper.getRandomMusicId(5);
        return 0;
    }

}
